/*<summary>
Created By : Preeti
Created On : 9/20/2008
Class Name : PatientWard_LoadMapper
Used In    : 
------------------------------------------------------------------------
Modification Log  
------------------------------------------------------------------------
Created By        Modified By         Remarks                             
-----------       ------------        ----------------------------------
                                                                          
------------------------------------------------------------------------
</summary>*/


using System.Xml;
using System.Data;
using System;
using Utils;
using System.Data.SqlClient;

namespace InPatientController
{
    public class PatientWard_DataLoader
    {
        public DataSet Get_PatientWard_History(string CRNumber)
        {
            ezUtilsAdapter DBL = new ezUtilsAdapter();
            DataSet ds = null;

            try
            {
                ds = DBL.RunSPReturnDataSet("SP_GetPatientWardHistory", "TR",
                        new SqlParameter("@biCRNumber", CRNumber));

                return ds;
            }
            catch (SqlException ex)
            {
                string errorMessage = String.Format(
                    "An Error Occurred While Loading the Patient Ward History from the DB. Message: {0}", ex.Message);
                return ds;
            }
            finally
            {
                DBL.Dispose();
                if (ds != null)
                {
                    ds.Dispose();
                }
            }    
        }

        public void Dispose()
        {
            this.Dispose(true);
            System.GC.SuppressFinalize(this);
        }

        private void Dispose(bool disposing)
        {
        }


    }
}